package com.tuanzi.loan.web.lazy.statistics.login;

import com.tuanzi.loan.business.service.statistics.StatCheckInService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.login.StatCheckInRequest;
import com.tuanzi.loan.vo.response.statistics.login.StatCheckInResponse;
import org.springframework.data.domain.Page;

/**
 * @Author: chenweijun
 * @Date: 2019/3/14 11:12
 * @Description:
 */
public class StatCheckInLazyDataModel extends BaseLazyDataModel<StatCheckInRequest, StatCheckInResponse>{

    private StatCheckInService statCheckInService = SpringContextHolder.getBean(StatCheckInService.class);

    public StatCheckInLazyDataModel(StatCheckInRequest request) {
        super(request);
    }

    @Override
    protected Page<StatCheckInResponse> doLoad(PageSearcher<StatCheckInRequest> pageSearcher) {
        return statCheckInService.list(pageSearcher);
    }
}
